#pragma once
#include <osg/Node>
#include "TerrianMesh.h"
#include "RoadMesh.h"

class SplitTerrian
{
public:
	SplitTerrian(string strTerrianFileName, string strModelFileName);
	~SplitTerrian();
	void Cal();
private:
	void CalWithDeaulty();
	void CalWithMesh();
protected:
	void LoadMeshData();
	void SaveMeshData();
	bool CheckTerrainIsSelfInter();
	void ClipTerrainWithRoad();
protected:
	string m_strTerrainFile, m_strRoadFile;
	TerrianMesh m_meshTerrain;
	RoadMesh m_meshRoad;
};

